package com.yehangtech.designpattern.行为型_状态模式.service;


import com.yehangtech.designpattern.行为型_状态模式.entity.Result;

public class CheckState extends State {
    public Result arraignment(String activityId, Enum<Status>
            currentStatus) {
        return new Result("0001", "待审核状态不可᯿复提审");
    }

    public Result checkPass(String activityId, Enum<Status> currentStatus) {
        ActivityService.execStatus(activityId, currentStatus,
                Status.Pass);
        return new Result("0000", "活动审核通过完成");
    }

    public Result checkRefuse(String activityId, Enum<Status>
            currentStatus) {
        ActivityService.execStatus(activityId, currentStatus,
                Status.Refuse);
        return new Result("0000", "活动审核拒绝完成");
    }

    @Override
    public Result checkRevoke(String activityId, Enum<Status>
            currentStatus) {
        ActivityService.execStatus(activityId, currentStatus,
                Status.Editing);
        return new Result("0000", "活动审核撤销回到编辑中");
    }

    public Result close(String activityId, Enum<Status> currentStatus) {
        ActivityService.execStatus(activityId, currentStatus,
                Status.Close);
        return new Result("0000", "活动审核关闭完成");
    }

    public Result open(String activityId, Enum<Status> currentStatus) {
        return new Result("0001", "⾮关闭活动不可开启");
    }

    public Result doing(String activityId, Enum<Status> currentStatus) {
        return new Result("0001", "待审核活动不可执⾏活动中变更");
    }
}

